-
Notifications
You must be signed in to change notification settings - Fork 14
Updated parameters for global ini parameters and added unit tests #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated parameters for global ini parameters and added unit tests #138
Conversation
…ions and update related tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances the parsing and validation of SAP HANA global.ini configuration parameters to support multiple HA provider sections. The changes introduce dynamic section parsing instead of hardcoded section names, expand the constants to include additional provider types (SAPHanaSR, suschksrv, sushanasr) and trace parameters, and significantly expand test coverage to validate the new multi-section parsing behavior.
Key changes:
- Dynamic parsing of multiple provider and trace sections from
global.ini - Expanded constants to define new provider sections for both SUSE and REDHAT platforms
- Comprehensive test coverage for multi-section parsing and parameter validation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/modules/get_pcmk_properties_db.py |
Refactored _parse_global_ini_parameters to dynamically iterate over all defined sections instead of hardcoding section names |
src/roles/ha_db_hana/tasks/files/constants.yaml |
Added structured definitions for ha_dr_provider_SAPHanaSR, ha_dr_provider_suschksrv, ha_dr_provider_sushanasr, and trace sections across SUSE/REDHAT platforms |
tests/modules/get_pcmk_properties_db_test.py |
Updated test fixtures and added new tests to verify multi-section parsing, including provider, execution order, and trace parameters |
tests/modules/configuration_check_module_test.py |
New comprehensive test suite for ConfigurationCheckModule covering initialization, validation, parallel execution, and error handling |
tests/module_utils/filesystem_collector_test.py |
New comprehensive test suite for FileSystemCollector covering LVM parsing, Azure disk correlation, and NFS storage integration |
…figuration keys in constants.yaml
…alancer test parameters for clarity
…pdating relevant documentation and playbook tasks for clarity and functionality.
…cy in enums and supported OS/DB combinations.
…istency and clarity.
hdamecharla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
…ts and improve validation checks; add tests for missing and nested properties.
…ser references in configuration checks; enhance network checks for clarity and accuracy.
…r conversion errors and sys.maxsize checks
…2sid in user list and source db2profile for commands
…eptions and improve error logging
…ce error handling in validation logic
…_configurations initialization
…update test case for frontend_ip_configurations
…on numbering for clarity
hdamecharla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
f4561b5
into
Azure:development-oct-2025
This pull request enhances the parsing and validation of
global.iniconfiguration sections for SAP HANA high-availability providers. The changes introduce support for multiple provider sections (such asha_dr_provider_SAPHanaSR,ha_dr_provider_suschksrv, and trace sections), update the constants and test data to reflect these new sections, and expand test coverage to ensure correct handling of multiple sections and parameters.Global INI section and provider support:
Updated the
_parse_global_ini_parametersmethod inget_pcmk_properties_db.pyto dynamically parse multiple provider and trace sections fromglobal.ini, instead of hardcoding section names. It now iterates over all defined sections in the constants and extracts their parameters, logging warnings if a section is missing.Expanded the
GLOBAL_INIconstants inconstants.yamlto include new provider sections (ha_dr_provider_SAPHanaSR,ha_dr_provider_suschksrv,ha_dr_provider_sushanasr) and trace parameters for both SUSE and REDHAT platforms. This allows for more flexible and accurate validation of different provider configurations. [1] [2] [3] [4]Test data and coverage improvements:
Updated test fixtures and dummy data in
get_pcmk_properties_db_test.pyto include the new provider and trace sections, ensuring that the test data accurately reflects real-worldglobal.inifiles. [1] [2]Added and expanded tests to verify that multiple provider sections are correctly detected and parsed, and that all expected parameters (including those with list values and trace parameters) are validated. This includes new tests for multiple section parsing and updated assertions for provider and execution order parameters. [1] [2] [3]
Minor improvements:
MockOpentest helper to track call count, which can aid in debugging and future test enhancements.